<?php (defined('BASEPATH')) OR exit('No direct script access allowed');

class Content_model  extends MY_Model  {

    public $table = 'lang_general';
   
	public function __construct() {
		$this->class_name = get_class ( $this );
		parent::__construct( $this->class_name, $this->table );
		parent::init( $this->class_name, $this->table );
	}
	
	
	/**
	 * Returns all category in function of the defined filters
	 * @param array $filter
	 */
	
	public function getAll($filter = array()){
		if (isset($filter ['field']) and strlen($filter ['field'])) {
            $this->db->select($filter ['field']);
        } else {
            $this->db->select();
        }
	 
        $query = $this->db->get($this->table);
        
        return $query;
	}
}